<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 transitional//EN">
<html>
<head>
<title>Image Item</title>
<link rel="stylesheet" href="../style/style.css" type="text/css"/>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body>
<h1>Image</h1>

<p>Displays an image within the report.</p>

<h3>Description</h3>
<p>Reports often display images in various formats: 
corporate logos, product images, icons, and so on. Popular image formats are 
JPEG for photographs, and GIF, PNG and SVG for computer-generated graphics such 
as logos.</p>
<p>The image item provides an image in one of a number of 
formats. The image can come from a number of sources. The image item can be 
sized to the image (in which case the height and width attributes are ignored), 
or the image can be sized or clipped to fit the item. Images are always scaled 
proportionately.</p>
<p>The image item is similar to the Image report element in 
RDL, the image control in AFC and the picture item in Crystal. Key features 
include:</p>

<ul>
<li>Store the image as part of the report design, obtain the image at run time, or reference the image at view time.</li>

<li>Allow the image to come from a BLOB field in the query.</li>

<li>Associate a hyperlink with the image.</li>

<li>Support line images. This is an image that is repeated to form a line. For example, a slice of an image can repeat to form a custom border along the top or side of a report. Allow repetition across or down.</li>

</ul>
<p>The image element should provide a number of options for 
handling images that are larger or smaller than the size of the element itself:</p>

<ul>
<li>Clip the image to fit the element. Provide options of clipping all four edges so the image remains centered in the element, or clipping the bottom and left edges.</li>

<li>Expand or shrink the element to fit the image size. This is the default, and works well for reports that use the power-assist form of layout (see below.)</li>

<li>Adjust the element size to fit the image.</li>

</ul>
<p>The following table shows which properties are used for 
each image source type.</p>

<table class="section-table">
  <tr>
    <td>Property</td>
    <td>Embedded</td>
    <td>File</td>
    <td>URL</td>
    <td>Computed</td>
  </tr>
  <tr>
    <td>
    Image Name</td>
    <td align="center">X</td>
    <td align="center"></td>
    <td align="center"></td>
    <td align="center"></td>
  </tr>
  <tr>
    <td>
    URI</td>
    <td align="center"></td>
    <td align="center">X</td>
    <td align="center">X</td>
    <td align="center"></td>
  </tr>
  <tr>
    <td>
    Value Expression</td>
    <td align="center"></td>
    <td align="center"></td>
    <td align="center"></td>
    <td align="center">X</td>
  </tr>
  <tr>
    <td>Type Expression</td>
    <td align="center"></td>
    <td align="center"></td>
    <td align="center"></td>
    <td align="center">X</td>
  </tr>
  <tr>
    <td>Size</td>
    <td align="center">X</td>
    <td align="center">X</td>
    <td align="center">X</td>
    <td align="center">X</td>
  </tr>
</table>

<h3>XML Summary</h3>

<h3>Inherited Properties</h3>

<dl>
<dt class="inherited-property">dataSet</dt>
<dd>Allows the user to fetch the image from a data set. 
The image is in the first row of the data set.</dd>
<dt class="inherited-property">toc</dt>
<dd>While the image can appear in the TOC, it is 
generally not very useful to do so.</dd>
</dl>

<h3>See Also</h3>
<h2 class="property">action</h2>

<p>An optional hyperlink for this image.</p>

<h3>Description</h3>
<p><p>Provides a hyperlink from this image.</p></p>

<h3>See Also</h3>
<h2 class="property">helpText</h2>

<p>An optional help text for the image.</p>

<h3>Description</h3>
<p><p>An optional help text for the image. The help text can 
contain HTML formatting and can be externalized. The web viewer shows this as 
&quot;balloon help.&quot;</p></p>

<h3>See Also</h3>

<p>helpTextID property</p>
<h2 class="property">altText</h2>

<p>An optional text message to display in place of the image in a web browser.</p>

<h3>Description</h3>
<p><p>An optional text message to display in place of the image 
in a web browser.</p></p>

<h3>See Also</h3>

<p>altTextID property</p>
<h2 class="property">altTextID</h2>

<p>Resource key for the altText property.</p>

<h3>Description</h3>
<p><p>Resource key that allows externalizing and localizing the value of the 
altText property.</p>
<p></p>

<h3>See Also</h3>

<p>altText property</p>
<h2 class="property">source</h2>

<p>The kind of image reference.</p>

<h3>Choices</h3>
<ul>
<li>file: The image is in a file.</li>

<li>url: image is given by a URL 
    to be evaluated at presentation time.</li>

<li>embed: The image is embedded 
    within the design.</li>

<li>expr: The image is returned 
    by an expression. (Not in the first release.)</li>

</ul>
<h3>Description</h3>
<p><p>The image can be provided in a number of formats. The 
choice here determines which of the other properties that BIRT will consider 
when obtaining the image value.</p><p>The expr option is not available in 
Release 1.0. That is, the image cannot be retrieved from a database in Release 
1.0.</p></p>

<h3>See Also</h3>
<h2 class="property">uri</h2>

<p>The identifier for the image if the type is File or URL.</p>

<h3>Description</h3>
<p><p>The identifier for the image if the type is File or URL. 
The type of image is inferred from the image file content or HTTP response.</p></p>

<h3>See Also</h3>
<h2 class="property">imageName</h2>

<p>The name of an embedded image if the Source type is Embedded.</p>

<h3>Description</h3>
<p><p>The name of an embedded image if the Source type is 
Embedded.</p></p>

<h3>See Also</h3>
<h2 class="property">valueExpr</h2>

<p>An expression which returns the image contents.</p>

<h3>Description</h3>
<p><p>An expression which returns the image contents.</p></p>

<h3>See Also</h3>
<h2 class="property">typeExpr</h2>

<p>An expression that returns the type of the image expressed as a MIME type.</p>

<h3>Description</h3>
<p><p>An expression that returns the type of the image 
expressed as a MIME type: image/jpeg, image/png, image/gif, etc. If omitted, 
BIRT will attempt to infer the image type from the data in the image itself.</p></p>

<h3>See Also</h3>
<h2 class="property">size</h2>

<p>How to manage the relationship between image and item 
size.</p>

<h3>Description</h3>
<h3>See Also</h3>

<h2 class="method">onCreate</h2>
<p>Script executed when the element is created in the Factory.</p>

<h3>Description</h3>
<p>Executed when the element is created in the Factory. Called after the item is created, but before 
the item is saved to the report document file. See the scripting spec for additional information 
about this script. Applications should perform visual customization in the on-render script instead.</p>

<h2 class="method">onPrepare</h2>
<p>It is for a script startup phase. No data binding yet. The design of an element can be changed here.</p>

<h3>Description</h3>
<p>It is for a script startup phase. No data binding yet. The design of an element can be changed here.</p>

<h2 class="method">onRender</h2>
<p>Script executed when the element is prepared for rendering in the Presentation engine.</p>

<h3>Description</h3>
<p>Executed when the element is prepared for rendering in the Presentation engine. Changes made to the 
element are written to the target output format, but not saved to the report document file. This is the
preferred place for visual customizations.</p>
</body>
</html>